<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});


Route::get("/",'Login\LoginController@login');                                                  //   登陆
Route::post("/do_login",'Login\LoginController@doLogin');                                   //   登陆


Route::group(['middleware' => ['Login']], function () {

    Route::get("/logout",'Login\LoginController@logout');                                       //   退出

    Route::get("/home",'Index\IndexController@home');                                           //   首页 页面
    Route::get("/index",'Index\IndexController@getAccountInfo');                                //   用户账号信息
    Route::any("/account",'Index\IndexController@getAccountList');                              //   获取账号列表
    Route::post("/addAccount",'Index\IndexController@addAccount');                              //   开通账号
    Route::post("/updateAccount",'Index\IndexController@updateAccount');                        //   修改账户信息
    Route::get("/getaccountonlieInfo",'Index\IndexController@getAccountOnlineInfo');            //   获取账户在线信息

    Route::get("/forbiddenAaccount",'Index\IndexController@forbiddenAccount');                  //   账户禁用

    Route::any("/bill",'Index\IndexController@getBillList');                                    //   账单列表
    Route::any("/online",'Index\IndexController@getAccountOnline');                             //   在线线路列表
    Route::get("/delete/account",'Index\IndexController@deleteAccount');                        //   删除账户
    Route::post("/renewAccount",'Index\IndexController@renewAccount');                           //   账户续费

    Route::get("/QuickOpenTestAccount",'Index\IndexController@QuickOpenTestAccount');            //   快捷创建测试账户
    Route::get("/QuickOpenPayAccount",'Index\IndexController@QuickOpenPayAccount');              //   快捷创建付费账户
    Route::post("/ratelimiting",'Index\IndexController@limitSpeed');                              //   限速
    Route::post("/batchrenewaccount",'Batch\BatchController@BatchRenewAccount');                              //   限速
    Route::post("/batchaddaccount",'Batch\BatchController@BatchAddAccount');                              //   限速

    Route::get("/onlineteam",'OnlineTeam\TeamController@getOnlineTeamList');                                         //   在线客服列表
    Route::get("/onlineteamupdatestatus",'OnlineTeam\TeamController@OnlineTeamUpdate');                              //   更新客服状态
    Route::get("/onlineTeamUpdateUserInfo",'OnlineTeam\TeamController@onlineTeamUpdateUserInfo');                    //   更新客服信息
    Route::get("/onlineTeamDelete",'OnlineTeam\TeamController@onlineTeamDelete');                                    //   删除客服
    Route::post("/onlineTeamAdd",'OnlineTeam\TeamController@onlineTeamAdd');                                         //   添加客服
    Route::get("/onlineteamdatalist",'OnlineTeam\TeamController@getOnlineTeamDataList');                             //   在线客服数据列表
    Route::any("/onlineTeamInfo",'OnlineTeam\TeamController@getOnlineTeamInfo');                                     //   在线客服详细数据列表
    Route::get("/submit/audit",'OnlineTeam\TeamController@submitAudit');                                             //   提交审核
    Route::post("/add/audit",'OnlineTeam\TeamController@AddAudit');                                                  //   客服提交审核
    Route::get("/audit/delete", 'OnlineTeam\TeamController@AuditDelete');                                                  //   客服提交审核





    Route::get("/getAccountlistData", 'Index\IndexController@getAccountListData');                                                     //   管理员列表
    Route::get("/admin", 'Admin\AdminController@getAdminList');                                                     //   管理员列表
    Route::post("/adminupdate", 'Admin\AdminController@doAdminUpdate');                                             //   管理员信息修改
    Route::get("/admin/recharge", 'Admin\AdminController@doAdminRecharge');                                         //   管理员充值
    Route::get("/admin/delete", 'Admin\AdminController@doAdminDelete');                                             //   管理员删除
    Route::post("/admin/add", 'Admin\AdminController@doAdminAdd');                                                  //   管理员添加

});